// "Copyright [2021] <Copyright Shengkai Lin>"

#include "gpu_schedule_algo.h"

namespace ai_sim {

GpuScheduleAlgorithm* GpuScheduleAlgorithm::get(GpuScheduleAlgo type) {
    if (type == GpuScheduleAlgo::Sequential) {
        return new SequentialScheduleAlgorithm();
    // } else if (type == GpuScheduleAlgo::Bestcase) {
    //     return new BestcaseScheduleAlgorithm();
    } else if (type == GpuScheduleAlgo::Worstcase) {
        return new WorstcaseScheduleAlgorithm();
    } else if (type == GpuScheduleAlgo::Randomly) {
        return new RandomlyScheduleAlgorithm();
    } else {
        throw omnetpp::cRuntimeError("DONT SUPPORT THE GPU SCHEDULE TYPE");
        return nullptr;
    }
}
}  // namespace ai_sim
